import SvgIcon from './SvgIcon/index.vue'
import Category from './Category/index.vue'

// 引入全部elmentPlus的图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const allGloablComponent:any = { SvgIcon, Category}
export default{
    install(app: any){
        Object.keys(allGloablComponent).forEach(key => {
            app.component(key, allGloablComponent[key])
        });

        // 将element-plus的图标全部注册
        for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
            app.component(key, component)
        }
    }
}